import 'package:flutter/material.dart';
import 'package:xindong/utils/xindong_image_util.dart';

class XinDongRoundImage extends StatelessWidget {
  final String? url;
  final double size;
  final double radius;

  const XinDongRoundImage({Key? key, required this.url, this.size = double.infinity, this.radius = 8.0})
      : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: size,
      height: size,
      clipBehavior: Clip.antiAlias,
      decoration: BoxDecoration(borderRadius: BorderRadius.circular(radius)),
      child: ImageUtil.networkImageUrl(url),
    );
  }
}
